/*
package com.jz.controller;

import com.jz.config.ConfigTest;
import com.jz.model.UserVo;
import com.jz.service.TestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static sun.awt.windows.ThemeReader.valid;
*/

/**
 * Created by WISE on 2021/12/23.
 */

/*@RestController//等同于@Controller和@Responsbody
@Slf4j*/
/*
public class TestController {

    @Autowired
    private TestService testService;
    private UserVo userVo;

    @GetMapping("queryUser")//1
    public List<UserVo> queryUser(Integer id) {
        log.info("正确3");
        log.error("错误3456");
        List<UserVo> test = testService.test(id);
        return test;
    }

    @PostMapping("queryUserByIds")//2
    public List<UserVo> queryUserByIds(@RequestBody List<Integer> idList) {

        List<UserVo> test = testService.queryUserByIds(idList);
*/
/*1.使用@data注解
    1.1引入lombok包
    1.2安装lombok插件（browse：浏览）*//*

        UserVo userVo = new UserVo();
        userVo.setId(10);
        return test;
    }

    */
/* @Value("${student.name}")
     private String name;
     @Value("${student.age}")
     private String age;*//*

    @Autowired
    private ConfigTest configTest;

    @GetMapping("testValue")//3
    public String testValue() {
        log.info("正确3");
        log.error("错误3");
        return configTest.getName() + configTest.getAge() + "大海";
    }




    @PostMapping("formValidation")//4.表单验证
    public  String formValidation(@RequestBody @Validated UserVo userVo, BindingResult bindingResult){
      if (bindingResult.hasErrors()){
          return  bindingResult.getFieldError().getDefaultMessage();
      }


        return "正确";
    }

}
*/
